package com.csy.ocmis.controller;


import com.csy.ocmis.entity.Departments;
import com.csy.ocmis.service.IDepartmentsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author csy
 * @since 2020-11-29
 */
@RestController
@RequestMapping("/departments")
public class DepartmentsController {

    @Autowired
    private IDepartmentsService departmentsService;
    //查询所有的科室
    @RequestMapping("selreg")
    public Object seldep(){
        List<Departments> seldep = departmentsService.list(null);
        return  seldep;
    }
}

